package com.chutoutian.vo;

import com.chutoutian.po.Product;
import lombok.Data;

@Data
public class CartItem {

    private String productId;
    private boolean checked;
    private String name;
    private String description;
    private String title;
    private String coverPicture;
    private Double price;
    private Double discountPrice;
    private Integer num;

    public CartItem(){};

    public CartItem(Product product){
        this.setProductId(product.getId());
        this.setName(product.getName());
        this.setTitle(product.getTitle());
        this.setCoverPicture(product.getCoverPicture());
        this.setDescription(product.getDescription());
        this.setDiscountPrice(product.getDiscountPrice());
        this.setPrice(product.getPrice());
    }
}
